(function () {
    "use strict";

    angular.module('core').factory('reportFinanceiroService', factory);
    factory.$inject = ['$http', '$q'];

    function factory($http, $q) {

        return {
            getAllContaReceber: function (args) {
                var deferred = $q.defer();
                $http.post('/reportFinanceiro/getAllContaReceber', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
            getAllLiquidacaoReceber: function (args) {
                var deferred = $q.defer();
                $http.post('/reportFinanceiro/getAllLiquidacaoReceber', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },

            getAllContaPagar: function (args) {
                var deferred = $q.defer();
                $http.post('/reportFinanceiro/getAllContaPagar', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
            getAllLiquidacaoPagar: function (args) {
                var deferred = $q.defer();
                $http.post('/reportFinanceiro/getAllLiquidacaoPagar', args)
                    .success(function (data) { deferred.resolve(data); })
                    .error(function (data, status, headers, config) { deferred.reject(data); });
                return deferred.promise;
            },
        };
    }

})();


